package com.yxq.mdt.app.modules.socialcontact.adapter;


import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yxq.mdt.app.R;
import com.yxq.mdt.app.glide.GlideHelper;
import com.yxq.mdt.app.modules.socialcontact.bean.MainSocialHeadBean;

import java.util.List;

public class MainSocialCircleHeadAdapter extends BaseQuickAdapter<MainSocialHeadBean.MenberListBean, BaseViewHolder> {

    public MainSocialCircleHeadAdapter(int layoutResId, @Nullable List<MainSocialHeadBean.MenberListBean> data) {
        super(layoutResId, data);
    }

    @Override
    public int getItemCount() {
        return super.getItemCount() > 3 ? 3 : super.getItemCount();
    }

    @Override
    protected void convert(BaseViewHolder helper, MainSocialHeadBean.MenberListBean item) {
        GlideHelper.setLoadImage(mContext, item.getHeadimg(), R.mipmap.head_icon, helper.getView(R.id.item_layout_head_img));
    }

}
